// 函数参数的定义
function addXY(x: number, y: number): number {
  return x + y
}

// void 无
function sayHello(): void {
  console.log('Hello')
}

// never 函数无法执行完
function errorFun(): never {
  throw new Error()
  console.log('Hello')
}

function forNever(): never {
  while (true) { }
  console.log('Hello')
}


function addSum({ x, y }: { x: number, y: number }): number {
  return x + y
}

function getNumber({ one }: { one: number }): number {
  return one
}

